Ext.onReady(function() {
	function addWord(item) {
		var el = Ext.get(item);		
		var oldVal = el.dom.firstChild.data;
		var author = oldVal.split(" ");
		var author1=author;
		var spliceValue = author1.splice(author.length-1,1);
		var array1=author.join(" ")
		el.dom.nextSibling.data = spliceValue.toString() +" "+ el.dom.nextSibling.data;
		Ext.get(item).dom.firstChild.data = array1;
	}
	Ext.select("span.grip1").on("mouseup", function(a, el, c) {
		var cmp = Ext.get(el).parent();
		addWord(cmp);
	})
});